package test;

public class ClientsCreator {
    public static void main(String[] args) {
        new Thread() {
            @Override
            public void run() {
                while(true) {
                    System.out.println("alive clients - " + ChatClient.getClientsNumber());
                    try {
                        Thread.sleep(5000);
                    } catch (InterruptedException e) {
                    }
                }
            }
        }.start();

        for (int i = 0; i < 1000; i++) {
            new ChatClient().start();
            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
